/* Create a new Person object representing the User object that was just created. Sync all data. */

trigger createPerson on User (after Insert) {

    User u = trigger.new[0];
    Person__c newAcct = new Person__c(Name = u.utorId__c, Email__c = u.Email, Full_Name__c = u.firstName + ' ' + u.lastName, First_Name__c = u.FirstName,
        Last_Name__c = u.LastName, Street__c = u.Street, City__c = u.city, Province_State__c = u.state, Postal_Zip_Code__c = u.postalcode,
        Country__c = u.country, Primary_Contact_Number__c = u.phone, Secondary_Contact_Number__c = u.mobilePhone, is_Tutor__c = u.isTutor__c, Courses__c = u.Courses__c);
    try {
       insert newAcct;
    } catch (DmlException e) {
    // Process exception here 
    }
}